package com.tedu;

import java.util.Arrays;

public class sort {
    public static void main(String[] args) {
        int a[] = {12,25,31,99,45,2,8,56,22,14};
        int t;
        for (int i =0;i<a.length;i++){
            for (int j=0;j<9;j++){
                if (a[j]>a[j+1]){
                    t=a[j];
                    a[j]=a[j+1];
                    a[j+1]=t;
                }
            }
        }
        System.out.print(Arrays.toString(a));
    }
}
